package com.mt.roll.core.dal.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 存储箱表
 * </p>
 *
 * @author mt
 * @since 2022-03-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_storage_box")
public class StorageBox extends Model<StorageBox> {

    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 删除标志，是否有效:1 可用 0不可用
     */
    @TableField("valid")
    @TableLogic
    private Integer valid;

    /**
     * 添加时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 创建人id
     */
    @TableField("creator_id")
    private Long creatorId;

    /**
     * 更新人id
     */
    @TableField("updater_id")
    private Long updaterId;

    /**
     * 修改时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 版本号 默认为 1
     */
    @TableField("version")
    @Version
    private String version;

    /**
     * 状态  0初始化，1损坏
     */
    @TableField("status")
    private Integer status;

    /**
     * 内部编码，系统自动生成
     */
    @TableField("inter_code")
    private String interCode;

    /**
     * 编码
     */
    @TableField("code")
    private String code;

    /**
     * 绑定工厂id
     */
    @TableField("factory_id")
    private Long factoryId;

    /**
     * 存储箱名称
     */
    @TableField("storage_box_name")
    private String storageBoxName;

    /**
     * 存储箱名fid编码
     */
    @TableField("storage_box_fid")
    private String storageBoxFid;

    /**
     * 库位数量
     */
    @TableField("num")
    private Integer num;

    /**
     * 描述信息
     */
    @TableField("description")
    private String description;

    /**
     * 备注
     */
    @TableField("note")
    private String note;

    /**
     * 英文名称
     */
    @TableField("en_name")
    private String enName;


    public static final String ID = "id";

    public static final String VALID = "valid";

    public static final String CREATE_TIME = "create_time";

    public static final String CREATOR_ID = "creator_id";

    public static final String UPDATER_ID = "updater_id";

    public static final String UPDATE_TIME = "update_time";

    public static final String VERSION = "version";

    public static final String STATUS = "status";

    public static final String INTER_CODE = "inter_code";

    public static final String CODE = "code";

    public static final String FACTORY_ID = "factory_id";

    public static final String STORAGE_BOX_NAME = "storage_box_name";

    public static final String STORAGE_BOX_FID = "storage_box_fid";

    public static final String NUM = "num";

    public static final String DESCRIPTION = "description";

    public static final String NOTE = "note";

    public static final String EN_NAME = "en_name";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
